package com.glc.hms.system.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.glc.hms.system.entity.SysMenuaction;
import com.glc.hms.system.dao.SysMenuactionMapper;
import com.glc.hms.system.service.ISysMenuactionService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 菜单动作权限 服务实现类
 * </p>
 *
 * @author Santa
 * @since 2019-11-29
 */
@Service
public class SysMenuactionServiceImpl extends ServiceImpl<SysMenuactionMapper, SysMenuaction> implements ISysMenuactionService {

    @Autowired
    private SysMenuactionMapper menuactionMapper;

    /**
     * 获取动作名称
     * @param actionId
     * @param menuId
     * @return
     */
    public SysMenuaction queryActionNameById(Integer actionId,Long menuId){
        QueryWrapper<SysMenuaction> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("menu_id",menuId);
        queryWrapper.eq("action_id",actionId);
        SysMenuaction sysMenuaction = menuactionMapper.selectOne(queryWrapper);
        return sysMenuaction;
    }
}
